package com.file.exceptions;

/**
 * Created by chairal on 2017/7/21.
 */
public enum ExceptionEnum {
    IMAGE_UPLOAD_FAIL(6000,"图片上传失败！"),
    IMAGE_LIMIT_ERROR(6001,"图片不能大于5M"),
    NOT_TEMP_IMAGE(6002,"不是服务器临时图片"),
    EMPTY_IMAGE(6003,"图片不能为空"),
    SYSTEM_TYPE_NAME_REPEAT(7001,"系统类型名字不能重复"),
    SYSTEM_TYPE_IS_USED(7002,"系统类型已经被菜单引用，不能删除或者修改！"),
    FTP_LOGIN_ERROR(8001, "ftp服务器用户名或密码错误！"),
    FTP_CLIENT_ERROR(8002, "FTP客户端出错！"),
    FTP_CLOSE_EXCEPTION(8003, "关闭FTP连接发生异常！"),
    BUCKET_NOT_EXIST(8100, "bucket不存在！"),
    TOKEN_ERROR(9000, "令牌错误"),
    REFRESH_TOKEN_ERROR(9001, "刷新令牌错误"),
    TOKEN_INVALID(9999, "令牌过期，请重新登录");

    ExceptionEnum(int code, String message){
        this.code = code;
        this.message = message;
    }

    private int code;

    private String message;

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
